<template>
    <div>
        <input type="text" placeholder="请输入代办事项" v-model="$store.state.msg">
        <button @click="add">添加</button>
    </div>
</template>
<script>
export default {
    methods:{
        add(){
            this.$store.commit('toMsg');
        }
    }
}
</script>
